﻿namespace TeacherLoad.Classes
{
    internal class Teacher
    {
        private int _id = 0;
        private string _name = "Нет данных для отображения";
        private bool _dismissed = false;
        private string _dateDismissed = "";

        public int Id { get => _id; set => _id = value; }
        public string FullName { get => _name; set => _name = value; }
        public bool Dismissed { get => _dismissed; set => _dismissed = value; }
        public string DateDismissed { get => _dateDismissed; set => _dateDismissed = value; }

        public Teacher() { }
        
        public Teacher(int id, string fullName, bool dismissed = false, string dateDismissed = "")
        {
            Id = id;
            FullName = fullName;
            Dismissed = dismissed;
            DateDismissed = dateDismissed;
        }

        public override string ToString()
        {
            if (Dismissed)
            { return FullName + $" (уволен {DateDismissed})"; }
            return FullName;
        }
    }
}
